using System;
using System.Collections;
using System.ComponentModel;
using System.Runtime.Serialization;

namespace Entities
{
    [Serializable]
    [System.Data.Services.Common.DataServiceKey("ID")]
    public class Role:EntityBase
    {
        #region Role Properties
        private System.Int32 _RoleCode;
		[DataMember] public virtual System.Int32 RoleCode
		{
			get
			{
				return _RoleCode;
			}
			set
			{
                if (_RoleCode != value)
                {
                    _RoleCode = value;
                    OnPropertyChanged("RoleCode");
                }
			}
		}
        private System.String _RoleName;
		[DataMember] public virtual System.String RoleName
		{
			get
			{
				return _RoleName;
			}
			set
			{
                if (_RoleName != value)
                {
                    _RoleName = value;
                    OnPropertyChanged("RoleName");
                }
			}
		}
        #endregion
        public override bool Equals(object obj)
        {
            if (obj == this) return true;
            if (obj == null) return false;
            if (obj is Role)
            {
                return (this.ID == (obj as Role).ID);
            }
            return false;
        }
        public override int GetHashCode()
        {
            return ID.GetHashCode();
        }
    }
}